﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace VRacer.Exceptions
{
    class CannotWriteHighscoresException : UIException, IVRacerException
    {
         public CannotWriteHighscoresException(Exception innerException)
            : this("This application can't save highscores for one of its tracks. Check if you have access rights.", innerException)
        {

        }

         public CannotWriteHighscoresException(string message, Exception innerException)
            : base(message, innerException)
        {
            Title = "Cannot save highscores";
            Code = 2;
            Details = "Vector Racer uses 'scores.xml' file to store its highscores information for track. This message means that this application can't write to this file. It is possible that you don't have needed rights to write to this file.";
        }

        #region IVRacerException Members

        public bool Critical
        {
            get { return true; }
        }

        #endregion
    }
}
